package com.gmlive.recyclerview.gridpager.indicator

import androidx.recyclerview.widget.RecyclerView

/**
 * @Author svenj
 * @Date 2021/1/22
 * @Email svenjzm@gmail.com
 */
interface OnPageChangeListener {
    /**
     * This method will be invoked when a new page becomes selected. Animation is not
     * necessarily complete.
     *
     * @param position Position index of the new selected page.
     */
    fun onPageSelected(position: Int)
    /**
     * Called when the scroll state changes. Useful for discovering when the user
     * begins dragging, when the pager is automatically settling to the current page,
     * or when it is fully stopped/idle.
     *
     * @param state The new scroll state.
     * @see [RecyclerView.SCROLL_STATE_IDLE] [RecyclerView.SCROLL_STATE_DRAGGING]
     * [RecyclerView.SCROLL_STATE_SETTLING]
     */
    fun onPageScrollStateChanged(state: Int)
}